<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Account page for salers</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <!-- GOOGLE WEB FONTS -->
    <link rel="stylesheet" th:href="@{/css/font-awesome.min.css}">

    <!-- BOOTSTRAP 3.3.7 CSS -->
    <link rel="stylesheet" th:href="@{/css/bootstrap.min.css}"/>

    <!-- SLICK v1.6.0 CSS -->
    <link rel="stylesheet" th:href="@{/css/slick-1.6.0/slick.css}"/>

    <link rel="stylesheet" th:href="@{/css/jquery.fancybox.css}"/>
    <link rel="stylesheet" th:href="@{/css/yith-woocommerce-compare/colorbox.css}"/>
    <link rel="stylesheet" th:href="@{/css/owl-carousel/owl.carousel.min.css}"/>
    <link rel="stylesheet" th:href="@{/css/owl-carousel/owl.theme.default.min.css}"/>
    <link rel="stylesheet" th:href="@{/css/js_composer/js_composer.min.css}"/>
    <link rel="stylesheet" th:href="@{/css/woocommerce/woocommerce.css}"/>
    <link rel="stylesheet" th:href="@{/css/yith-woocommerce-wishlist/style.css}"/>


    <link rel="stylesheet" th:href="@{/css/custom.css}"/>
    <link rel="stylesheet" th:href="@{/css/app-orange.css}" id="theme_color"/>
    <link rel="stylesheet" href="" id="rtl"/>
    <link rel="stylesheet" th:href="@{/css/app-responsive.css}"/>
    <link rel="stylesheet" th:href="@{/css/bootstrap/dist/css/bootstrap.min.css}">
    <!-- Font Awesome -->
    <link rel="stylesheet" th:href="@{/css/font-awesome/css/font-awesome.min.css}">
    <!-- Ionicons -->
    <link rel="stylesheet" th:href="@{/css/Ionicons/css/ionicons.min.css}">
    <!-- DataTables -->
    <link rel="stylesheet" th:href="@{/css/datatables.net-bs/css/dataTables.bootstrap.min.css}">
</head>
<body class="page woocommerce-account woocommerce-page">


<div class="body-wrapper theme-clearfix">
    <header id="header" class="header header-style1">
        <div class="header-top clearfix" id="top">
            <div class="container">
                <div class="rows">
                    <!-- SIDEBAR TOP MENU  顶部菜单-->
                    <div class="pull-left top1">
                        <div class="widget pull-left">
                            <div class="widget-inner">
                                <div class="call-us"><span th:text="#{callusnow}">Call Us Now: </span>0123-444-666654123
                                </div>
                            </div>
                        </div>

                    </div>

                    <div class="pull-right">
                        <div class="sidebar-account pull-left">
                            <div class="account-title">
                        <span th:if="${session.userInfo != null }">	<span
                                th:text="${session.userInfo.username}"></span>
                        </span>

                                <span th:if="${session.userInfo == null}">
									[[#{myaccount}]]
                        </span>

                            </div>

                            <div id="my-account" class="my-account">
                                <div class="widget widget_nav_menu">
                                    <div class="widget-inner">
                                        <ul id="menu-my-account" class="menu">
                                            <li class="menu-my-account">
                                                <a class="item-link" th:href="@{/account_saler}">
                                                    <span class="menu-title">[[#{myaccount}]]</span>
                                                </a>
                                            </li>
                                            <li>
                                        <span th:if="${session.userInfo != null }">
                                            <span><a th:href="@{/saler_logout}">[[#{logout}]]</a></span>
                                        </span>

                                                <span th:if="${session.userInfo == null}">
										<a href="javascript:void(0);" data-toggle="modal" data-target="#login_form">
                                            <span>[[#{login.btn}]]</span>
                                        </a>
                                        </span>

                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="header-mid clearfix" id="mid">
            <div class="container">
                <div class="rows">
                    <!-- LOGO -->
                    <div class="etrostore-logo pull-left">
                        <a>
                            <img th:src="@{/images/icons/logo-orange.png}" alt="Shoopy">
                        </a>
                    </div>
                </div>
            </div>
        </div>


    </header>

    <div class="listings-title">
        <div class="container">
            <div class="wrap-title">
                <div class="bread">
                    <div class="breadcrumbs theme-clearfix">
                        <div class="container">
                            <ul class="breadcrumb">
                                <li class="active">
                                    <span th:text="#{salersaccount}">Salers' Account</span>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="container">
        <div class="row">
            <div id="contents" role="main" class="main-page  col-lg-12 col-md-12 col-sm-12 col-xs-12">
                <div class="post-6 page type-page status-publish hentry">
                    <div class="entry">
                        <div class="entry-content">
                            <header>
                                <h2 class="entry-title" th:text="#{salersaccount}">Salers' Account</h2>
                            </header>

                            <div class="entry-content">
                                <div class="woocommerce">
                                    <nav class="woocommerce-MyAccount-navigation" id="side">
                                        <ul>
                                            <li th:class="${actUrl == 'stock'?'is-active':''}">
                                                <a href="stock.html" th:href="@{/account_saler}">[[#{stocklist}]]</a>
                                            </li>
                                            <li th:class="${actUrl == 'orderlistforsaler'?'is-active':''}">
                                                <a href="stock.html" th:href="@{/salerorder}">[[#{salerorder}]]</a>
                                            </li>

                                        </ul>
                                    </nav>

                                    <div class="woocommerce-MyAccount-content">
                                        <p>
												<span th:if="${session.userInfo != null }">	Hello <strong><span
                                                        th:text="${session.userInfo.username}"></span>
												</strong></span>
                                        </p>
                                        <p>
                                            [[#{fromdashbo}]]
                                            <a th:href="@{/account_saler}">[[#{showthestock}]]</a>
                                            <a th:href="@{/salerorder}">[[#{showtehorderlist}]]</a>
                                        </p>
                                        <div class="content-wrapper">
                                            <!-- Content Header (Page header) -->
                                            <section class="content-header">
                                                <h1>
                                                    [[#{stocktable}]]
                                                </h1>
                                            </section>
                                            <!-- Main content -->
                                            <section class="content">
                                                <div class="row">
                                                    <div class="col-xs-12">
                                                        <div class="box">
                                                            <div class="box-header">
                                                                <h3 class="box-title">
                                                                    [[#{stocktablewithfullitems}]]</h3>
                                                            </div>
                                                            <!-- /.box-header -->
                                                            <div class="box-body">
                                                                <table id="example1"
                                                                       class="table table-bordered table-striped">
                                                                    <thead>
                                                                    <tr>
                                                                        <th>商品ID</th>
                                                                        <th>商品名称</th>
                                                                        <th>商品库存</th>
                                                                        <th>商品简介</th>
                                                                        <th>商品价格</th>
                                                                        <th>折扣价格</th>
                                                                        <th>更新日期</th>
                                                                        <th>用户id</th>
                                                                        <th>大小</th>
                                                                        <th>商品状态</th>
                                                                        <th>操作</th>
                                                                        <th></th>
                                                                    </tr>
                                                                    </thead>
                                                                    <tr th:each="p,userstat:${session.productList}">
                                                                        <td th:text="${p.pid}"></td>
                                                                        <td th:text="${p.pname}"></td>
                                                                        <td th:text="${p.stock}"></td>
                                                                        <td th:text="${p.description}"></td>
                                                                        <td th:text="${p.marketPrice}"></td>
                                                                        <td th:text="${p.shopPrice}"></td>
                                                                        <td th:text="${#dates.format(p.pdate,'yyyy-MM-dd HH:mm')}"></td>
                                                                        <td th:text="${p.uid}"></td>
                                                                        <td th:text="${p.size}"></td>
                                                                        <td th:if="${p.stock<10 && p.stock>0 }"
                                                                            th:text="缺货"></td>
                                                                        <td th:if="${p.stock==0 }"><span
                                                                                th:text="无货"></span></td>
                                                                        <td th:if="${p.stock>=10 }"><span
                                                                                th:text="正常"></span></td>
                                                                        <td><a class="btn btn-primary"
                                                                               th:href="@{/edit/}+${p.pid}">入库商品</a>
                                                                            <a class="btn btn-success"
                                                                               th:href="@{/edit2/}+${p.pid}">查看详情</a>
                                                                        <td>
                                                                    </tr>
                                                                </table>

                                                            </div>
                                                            <a th:href="'/add?id='+${session.userInfo.id}">
                                                                <button type="button" class="btn btn-success">添加商品
                                                                </button>
                                                            </a>
                                                            <!-- /.box-body -->
                                                        </div>
                                                        <!-- /.box -->
                                                    </div>
                                                    <!-- /.col -->
                                                </div>
                                                <!-- /.row -->
                                            </section>
                                            <!-- /.content -->
                                        </div>

                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="search_form" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog block-popup-search-form">
        <form role="search" method="get" class="form-search searchform" action="">
            <input type="text" value="" name="s" class="search-query" placeholder="Enter your keyword..."/>

            <button type="submit" class="fa fa-search button-search-pro form-button"></button>

            <a href="javascript:void(0)" title="Close" class="close close-search" data-dismiss="modal">X</a>
        </form>
    </div>
</div>

<div th:replace="commons/bar::#login_form"></div>

<a id="etrostore-totop" href="#"></a>

<div id="subscribe_popup" class="subscribe-popup" style="background: url(images/icons/bg_newsletter.jpg)">
    <div class="subscribe-popup-container">
        <h2>Join our newsletter</h2>
        <div class="description">Subscribe now to get 40% of on any product!</div>
        <div class="subscribe-form">
            <form id="mc4wp-form-2" class="mc4wp-form mc4wp-form-275" method="post" data-id="275" data-name="">
                <div class="mc4wp-form-fields">
                    <div class="newsletter-content">
                        <input type="email" class="newsletter-email" name="EMAIL" placeholder="Your email" required=""/>
                        <input class="newsletter-submit" type="submit" value="Subscribe"/>
                    </div>
                </div>
                <div class="mc4wp-response"></div>
            </form>
        </div>

        <div class="subscribe-checkbox">
            <label for="popup_check">
                <input id="popup_check" name="popup_check" type="checkbox"/>
                <span>Don't show this popup again!</span>
            </label>
        </div>

        <div class="subscribe-social">
            <div class="subscribe-social-inner">
                <a href="#" class="social-fb">
                    <span class="fa fa-facebook"></span>
                </a>

                <a href="#" class="social-tw">
                    <span class="fa fa-twitter"></span>
                </a>

                <a href="#" class="social-gplus">
                    <span class="fa fa-google-plus"></span>
                </a>

                <a href="#" class="social-pin">
                    <span class="fa fa-instagram"></span>
                </a>

                <a href="#" class="social-linkedin">
                    <span class="fa fa-pinterest-p"></span>
                </a>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" th:src="@{js/jquery/jquery.min.js}"></script>
<script type="text/javascript" th:src="@{js/jquery/jquery-migrate.min.js}"></script>
<script type="text/javascript" th:src="@{js/bootstrap.min.js}"></script>
<script type="text/javascript" th:src="@{js/jquery/js.cookie.min.js}"></script>

<!-- OPEN LIBS JS -->
<script type="text/javascript" th:src="@{js/owl-carousel/owl.carousel.min.js}"></script>
<script type="text/javascript" th:src="@{js/slick-1.6.0/slick.min.js}"></script>

<script type="text/javascript" th:src="@{js/yith-woocommerce-compare/jquery.colorbox-min.js}"></script>
<script type="text/javascript" th:src="@{js/sw_core/isotope.js}"></script>
<script type="text/javascript" th:src="@{js/sw_core/jquery.fancybox.pack.js}"></script>
<script type="text/javascript" th:src="@{js/sw_woocommerce/category-ajax.js}"></script>
<script type="text/javascript" th:src="@{js/sw_woocommerce/jquery.countdown.min.js}"></script>
<script type="text/javascript" th:src="@{js/js_composer/js_composer_front.min.js}"></script>

<script type="text/javascript" th:src="@{js/plugins.js}"></script>
<script type="text/javascript" th:src="@{js/megamenu.min.js}"></script>
<script type="text/javascript" th:src="@{js/main.min.js}"></script>

<script type="text/javascript">
    var sticky_navigation_offset_top = $("#header .header-bottom").offset().top;
    var sticky_navigation = function () {
        var scroll_top = $(window).scrollTop();
        if (scroll_top > sticky_navigation_offset_top) {
            $("#header .header-bottom").addClass("sticky-menu");
            $("#header .header-bottom").css({"top": 0, "left": 0, "right": 0});
        } else {
            $("#header .header-bottom").removeClass("sticky-menu");
        }
    };
    sticky_navigation();
    $(window).scroll(function () {
        sticky_navigation();
    });

    $(document).ready(function () {
        $(".show-dropdown").each(function () {
            $(this).on("click", function () {
                $(this).toggleClass("show");
                var $element = $(this).parent().find("> ul");
                $element.toggle(300);
            });
        });
    });
</script>

<!--[if gte IE 9]><!-->
<script type="text/javascript">
    var request, b = document.body, c = 'className', cs = 'customize-support',
        rcs = new RegExp('(^|\\s+)(no-)?' + cs + '(\\s+|$)');
    request = true;

    b[c] = b[c].replace(rcs, ' ');
    // The customizer requires postMessage and CORS (if the site is cross domain)
    b[c] += (window.postMessage && request ? ' ' : ' no-') + cs;
</script>
<script th:src="@{/css/jquery/dist/jquery.min.js}"></script>
<!-- Bootstrap 3.3.7 -->
<script th:src="@{/css/bootstrap/dist/js/bootstrap.min.js}"></script>
<!-- DataTables -->
<script th:src="@{/css/datatables.net/js/jquery.dataTables.min.js}"></script>
<script th:src="@{/css/datatables.net-bs/js/dataTables.bootstrap.min.js}"></script>
<!-- SlimScroll -->
<script th:src="@{/css/jquery-slimscroll/jquery.slimscroll.min.js}"></script>
<!-- FastClick -->
<script th:src="@{/css/fastclick/lib/fastclick.js}"></script>
<script>
    $(function () {
        $('#example1').DataTable()
        $('#example2').DataTable({
            'paging': true,
            'lengthChange': false,
            'searching': false,
            'ordering': true,
            'info': true,
            'autoWidth': false
        })
    })
</script>
<!--<![endif]-->
</body>
</html>